package com.loong.android.sqlite.data;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Xili on 2020/3/22.
 */

public class TableData {
    //表名
    private String tableName;
    //表实体类
    private Class<?> tableClass;
    //表字段列表
    private final List<EntityFieldData> columnKeyList = new ArrayList<>();

    public TableData() {

    }

    public TableData(String tableName, Class tableClass) {
        this.tableName = tableName;
        this.tableClass = tableClass;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public Class getTableClass() {
        return tableClass;
    }

    public void setTableClass(Class tableClass) {
        this.tableClass = tableClass;
    }

    public List<EntityFieldData> getColumnKeyList() {
        return columnKeyList;
    }

    public void setColumnKeyList(List<EntityFieldData> columnKeyList) {
        this.columnKeyList.clear();
        if(columnKeyList != null) this.columnKeyList.addAll(columnKeyList);
    }
}
